# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V35.Model.CreativeAssetMetadata do
  @moduledoc """
  CreativeAssets contains properties of a creative asset file which will be uploaded or has already been uploaded. Refer to the creative sample code for how to upload assets and insert a creative.

  ## Attributes

  *   `assetIdentifier` (*type:* `GoogleApi.DFAReporting.V35.Model.CreativeAssetId.t`, *default:* `nil`) - ID of the creative asset. This is a required field.
  *   `clickTags` (*type:* `list(GoogleApi.DFAReporting.V35.Model.ClickTag.t)`, *default:* `nil`) - List of detected click tags for assets. This is a read-only, auto-generated field. This field is empty for a rich media asset.
  *   `counterCustomEvents` (*type:* `list(GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent.t)`, *default:* `nil`) - List of counter events configured for the asset. This is a read-only, auto-generated field and only applicable to a rich media asset.
  *   `detectedFeatures` (*type:* `list(String.t)`, *default:* `nil`) - List of feature dependencies for the creative asset that are detected by Campaign Manager. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field.
  *   `exitCustomEvents` (*type:* `list(GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent.t)`, *default:* `nil`) - List of exit events configured for the asset. This is a read-only, auto-generated field and only applicable to a rich media asset.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Numeric ID of the asset. This is a read-only, auto-generated field.
  *   `idDimensionValue` (*type:* `GoogleApi.DFAReporting.V35.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the numeric ID of the asset. This is a read-only, auto-generated field.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeAssetMetadata".
  *   `richMedia` (*type:* `boolean()`, *default:* `nil`) - True if the uploaded asset is a rich media asset. This is a read-only, auto-generated field.
  *   `timerCustomEvents` (*type:* `list(GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent.t)`, *default:* `nil`) - List of timer events configured for the asset. This is a read-only, auto-generated field and only applicable to a rich media asset.
  *   `warnedValidationRules` (*type:* `list(String.t)`, *default:* `nil`) - Rules validated during code generation that generated a warning. This is a read-only, auto-generated field. Possible values are: - "ADMOB_REFERENCED" - "ASSET_FORMAT_UNSUPPORTED_DCM" - "ASSET_INVALID" - "CLICK_TAG_HARD_CODED" - "CLICK_TAG_INVALID" - "CLICK_TAG_IN_GWD" - "CLICK_TAG_MISSING" - "CLICK_TAG_MORE_THAN_ONE" - "CLICK_TAG_NON_TOP_LEVEL" - "COMPONENT_UNSUPPORTED_DCM" - "ENABLER_UNSUPPORTED_METHOD_DCM" - "EXTERNAL_FILE_REFERENCED" - "FILE_DETAIL_EMPTY" - "FILE_TYPE_INVALID" - "GWD_PROPERTIES_INVALID" - "HTML5_FEATURE_UNSUPPORTED" - "LINKED_FILE_NOT_FOUND" - "MAX_FLASH_VERSION_11" - "MRAID_REFERENCED" - "NOT_SSL_COMPLIANT" - "ORPHANED_ASSET" - "PRIMARY_HTML_MISSING" - "SVG_INVALID" - "ZIP_INVALID" 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :assetIdentifier => GoogleApi.DFAReporting.V35.Model.CreativeAssetId.t() | nil,
          :clickTags => list(GoogleApi.DFAReporting.V35.Model.ClickTag.t()) | nil,
          :counterCustomEvents =>
            list(GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent.t()) | nil,
          :detectedFeatures => list(String.t()) | nil,
          :exitCustomEvents =>
            list(GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent.t()) | nil,
          :id => String.t() | nil,
          :idDimensionValue => GoogleApi.DFAReporting.V35.Model.DimensionValue.t() | nil,
          :kind => String.t() | nil,
          :richMedia => boolean() | nil,
          :timerCustomEvents =>
            list(GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent.t()) | nil,
          :warnedValidationRules => list(String.t()) | nil
        }

  field(:assetIdentifier, as: GoogleApi.DFAReporting.V35.Model.CreativeAssetId)
  field(:clickTags, as: GoogleApi.DFAReporting.V35.Model.ClickTag, type: :list)

  field(:counterCustomEvents,
    as: GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent,
    type: :list
  )

  field(:detectedFeatures, type: :list)
  field(:exitCustomEvents, as: GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent, type: :list)
  field(:id)
  field(:idDimensionValue, as: GoogleApi.DFAReporting.V35.Model.DimensionValue)
  field(:kind)
  field(:richMedia)
  field(:timerCustomEvents, as: GoogleApi.DFAReporting.V35.Model.CreativeCustomEvent, type: :list)
  field(:warnedValidationRules, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V35.Model.CreativeAssetMetadata do
  def decode(value, options) do
    GoogleApi.DFAReporting.V35.Model.CreativeAssetMetadata.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V35.Model.CreativeAssetMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
